package com.xxl.job.admin.utils;

public class RegexUtil {
    // 验证调度时间的正则表达式
    public static boolean isValidCronExpression(String line) {
        // 定义符合标准crontab格式的正则表达式
        String cronRegex = "^(#?\\s*(?:@(reboot|yearly|annually|monthly|weekly|daily|hourly)|([0-9*/,-]+\\s+){4}[0-9*/,-]+))$";
        return line.matches(cronRegex);
    }
}
